import time

N = 100000000
lst = list(range(N))
s = set(lst)
x = N - 1

start = time.time()
x in lst
print('list:', time.time() - start)

start = time.time()
x in s
print('set:', time.time() - start)